import Shop from '../component/Shop'
import {connect} from 'react-redux'
import React,{Component} from 'react'
const mapStateToProps=(state)=>{
// console.log(state);
  return{
    arr:state
  }
}
const mapDispatchToProps=(dispatch)=>{
  return{
      cart:(a)=>{
        dispatch({
          type:"CART",
          text:a
        })
      },
      add:(a)=>{
        dispatch({
          type:"jia",
          text:a
        })
      },
    jian:(a)=>{
      dispatch({
        type:"jian",
        text:a
      })
    }
  }
}
const Coun=connect(
  mapStateToProps,
  mapDispatchToProps
)(Shop)
export default Coun